home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
051-075
/
scopedisk70
/
menumgr
/
menumanager.doc
< prev
next >
Wrap
Text File
|
1995-03-19
|
7KB
|
169 lines
MenuManager v1.00 Documentation
28-MAR-89
by
Dan R. Schenck
MenuManager is an ARexx program for creating a custom Workbench menu strip
for launching programs and running system commands without typing entries from
the CLI. I wrote it mainly just to see how well something like this could be
implemented using ARexx by William Hawes. This program also makes extensive
use of the Intuition interface and extensive functions found in the
rexxarplib.library, version 2.1, by W. G. J. Langeveld. ARexx coupled with the
rexxarplib.library is sufficiently rich an environment to create a very
elaborate and intelligent application. However, speed of execution suffers in
initially parsing the menu definition file used to create the custom menu
strip. I'm still working on it and may come up with vastly improved start-up
times eventually. The best thing to cure this problem might be a much speedier
version of ARexx which is roomered to be in the making.
To use MenuManager, you must have the ARP commands available in your C:
directory (or somewhere in the current path). In addition, you must set up the
rexxarplib.library for ARexx to access. The .zoo file you got these docs from
should contain the following files:
MenuManager.rexx
MenuManager.def
MenuManager.doc
After setting up the version 2.1 rexxarplib.library and making the ARP commands
available, create a MenuManager.def file like the one in this archive (using
your favorite programs) in the manner described below, and place it in the S:
directory or the current directory you launch MenuManager.rexx from, and away
you go. A typical start-up sequence would be:
arun rx MenuManager
Optionally, you may use any name you like for the .def file. To select a
file that is not named MenuManager.def, start MenuManager with the parameter
"-f" to bring up a file requestor which allows you to choose a .def file, like:
arun rx MenuManager -f
Once MenuManager is initiated be PATIENT. It is a tad slow parsing your
.def file. After that is complete, there are several menu choices builtin to
MenuManager in addition to those you set up. They are generally self-
explanatory, but you probably want to avoid using the menu names "System" and
"Options" to avoid confusion. Using the items in the Options menu, you can
change menus, set up a request for help about one of the menu items you entered
or list the actions that will take place by selecting one of your items.
Now, to the menu definition file description!
First, any line without the appropriate MenuManager "trigger" as the first
nonblank character is considered a comment (Tip - don't use too many comments
because of initial slow processing speed in parsing file). Triggers are as
follows:
"=" - Immediately preceeds a MenuManager command. Commands are:
"MENU" - Start a new menu.
"ITEM" - New item under current menu.
"SUBITEM" - New subitem under current item.
"&" - Immediately preceeds a menu, item or subitem name field.
"." - Immediately preceeds an item or subitem action field.
"$" - Immediately preceeds an item or subitem help field.
The rules are simple. Any command, name, action or help field starts with
the appropriate trigger from the list above (leading blanks before trigger
ignored; blanks following trigger only allowed for name, action and help
fields, and form part of the field). The appropriate heirarchy for statements
is:
menu command
menu name
item command
item name
action <==== multiple fields allowed
help <==== multiple fields allowed and inclusion is optional
item command
item name
subitem command
subitem name
action
menu command
menu name
etc...
Name fields may include an "@" at the end of the field, followed by a
single letter to be used as a hot key (ex. - &Access! @A). The hot key letter
must be unique (including the "Q" and "H" used in the predefined menus).
You may have as many action fields as necessary associated with an item or
subitem. Items with subitems may not have action fields associated with the
item. All action fields should be valid CLI programs or commands. Multiple
action fields are treated as CLI statements which will be executed using the
"execute" command.
Action fields may contain special "parameter fields" which initiate
prompting. Parameter fields are enclosed in "[]"s. Bracketed fields may
contain the following:
!text - Simple prompt for user input, where "text" is the
requestor prompt string message.
ex. - [!Enter Directory Name]
%directory - Prompt user for file using file requestor pointing,
optionally, to a "directory". !text may be included in
field to serve as requestor prompt string message.
ex. - [!Select WP File%Work:letters]
Thus, an empty parameter field (ex. - []) or one with only a !text (ex. -
[!Enter Optional parameters], will generate a simple string input requestor,
while one including a %directory (ex. - [%VD0:]) generates a file requestor.
Double !s or %s in an action parameter field indicate the respective ! or
% symbol is to be treated as part of the text (ex. - [!Enter a %% to calculate]
or [!Enter a file!!%]).
Parameters may also be nested, i.e. [!Select a file%[!Enter a directory]].
Fields are parsed from right to left; so, in the example, a directory is
requested from the user which will then be used as the current directory in
the file requestor.
As many help fields as appropriate may optionally be entered for an item
or subitem. Each field will be a separate line of output in the ensuing help
message. However, "\"s may be included in one help field to create multiple
lines of output (ex. - $This is line one\This is line two).
Below is a simple example menu:
=MENU
&Utilities
=ITEM
&Edit a File @E
.arun ed [!Select File To Edit%]
=ITEM
&Type a File @T
.type [!Select File To Type%]
=MENU
&Processes
=ITEM
&Start New CLI @C
.newcli >NIL:
&Start New Shell @S
.newshell >NIL: NEWCON:0/12/320/100/MMgrShell
For a more complex example, see the MenuManager.def file included in this
archive.
Please contact me at the address below with bug reports, comments, etc.:
Dan R. Schenck
7010 E. 77th Place
Tulsa, Ok 74133
(918) 492-0523
GEnie: D.SCHENCK